﻿namespace MaxLengthString
{
    using System;
    using System.Linq;

    public class MainMaxLengthString
    {
        //// 1.2.16.17. Write a program to return the string with maximum length from an array of strings. Use LINQ.

        private static string longest = string.Empty;

        private static void Main()
        {
            string[] sample = new string[] { "asda", "as", "qwewq", "klqwjelqwkj", "kwqeqwjkl", "kqwelkqjel", "askd" };

            var longest = sample.OrderByDescending(x => x.Length);

            Console.WriteLine(longest.First());
        }
    }
}